home *** CD-ROM | disk | FTP | other *** search
/ Your Choice 3 / Your Choice Software Collection 3.iso / os2 / new_api / 21newapi.doc
Text File  |  1994-04-03  |  10KB  |  320 lines

  1. ================================================
  2.  21newapi.doc -- What APIs are new to OS/2 2.1?
  3. ================================================
  4.  
  5.  
  6. Compiled by Marc E.E. van Woerkom , 4/94
  7.  
  8. Usenet: marc_van-woerkom@ac3.maus.de
  9.         marc@pxcl1.gi.rwth-aachen.de
  10.  
  11.  
  12.  
  13. SECTION ONE: DOCUMENTED NEW FEATURES
  14. ====================================
  15.  
  16.  
  17. Source: OS/2 2.1 CP Programming Reference
  18. -----------------------------------------
  19.  
  20. New CP APIs:
  21.  
  22.   o DosProtectClose() -- Close a Handle to a File, Pipe, or Device
  23.  
  24.         APIRET DosProtectClose(HFILE hFile, FHLOCK fhFileHandleLockID)
  25.  
  26.     DosProtectClose closes a handle to a file, pipe, or device.
  27.  
  28.  
  29.   o DosProtectEnumAttribute() -- Identify Names and Lengths of Extended
  30.                                  Attributes
  31.  
  32.         APIRET DosProtectEnumAttribute(ULONG ulRefType, PVOID pvFile,
  33.                                        ULONG ulEntry, PVOID pvBuf,
  34.                                        ULONG cbBuf, PULONG pulCount,
  35.                                        ULONG ulInfoLevel,
  36.                                        FHLOCK fhFileHandleLockID)
  37.  
  38.     DosProtectEnumAttribute identifies names and lengths of extended
  39.     attributes for a specific file or subdirectory.
  40.  
  41.  
  42.   o DosProtectOpen() -- Open a File and Return a Protected File Handle
  43.  
  44.         APIRET DosProtectOpen(PSZ pszFileName, PHFILE phf, PULONG Action,
  45.                               ULONG cbFile, ULONG ulAttribute,
  46.                               ULONG fsOpenFlags, ULONG fsOpenMode,
  47.                               PEAOP2 peaop2, PFHLOCK pfhFileHandleLockID)
  48.  
  49.     DosProtectOpen opens a new file, an existing file, or a replacement for
  50.     an existing file and returns a protected file handle.  An open file can
  51.     have extended attributes.
  52.  
  53.  
  54.   o DosProtectQueryFHState() -- Query File Handle State
  55.  
  56.         APIRET DosProtectQueryFHState(HFILE FileHandle,
  57.                                       PULONG FileHandleState,
  58.                                       FHLOCK fhFileHandleLockID)
  59.  
  60.     DosProtectQueryFHState queries the state of the specified protected file
  61.     handle.
  62.  
  63.  
  64.   o DosProtectQueryFileInfo() -- Query File Information
  65.  
  66.         APIRET DosProtectQueryFileInfo(HFILE hf, ULONG ulInfoLevel,
  67.                                        PVOID pInfo, ULONG cbInfoBuf,
  68.                                        FHLOCK fhFileHandleLockID)
  69.  
  70.     DosProtectQueryFileInfo gets file information.
  71.  
  72.  
  73.   o DosProtectRead() -- Read from a File, Pipe, or Device to a Buffer
  74.  
  75.         APIRET DosProtectRead(HFILE hFile, PVOID pBuffer, ULONG cbRead,
  76.                               PULONG pcbActual, FHLOCK fhFileHandleLockID)
  77.  
  78.     DosProtectRead reads the specified number of bytes from a file, pipe, or
  79.     device to a buffer location.
  80.  
  81.  
  82.   o DosProtectSetFHState() -- Set the State of a Specified Protected File
  83.                               Handle
  84.  
  85.         APIRET DosProtectSetFHState(HFILE FileHandle, ULONG FileHandleState,
  86.                                     FHLOCK fhFileHandleLockID)
  87.  
  88.     DosProtectFHState sets the state of the specified protected file handle.
  89.  
  90.  
  91.   o DosProtectSetFileInfo() -- Set File Information
  92.  
  93.         APIRET DosProtectSetFileInfo(HFILE hf, ULONG ulInfoLevel,
  94.                                      PVOID pInfoBuf, ULONG cbInfoBuf,
  95.                                      FHLOCK fhFileHandleLockID)
  96.  
  97.     DosProtectSetFileInfo sets file information.
  98.  
  99.  
  100.   o DosProtectSetFileLocks() -- Lock and Unlock a Range of an Open File
  101.  
  102.         APIRET DosProtectSetFileLocks(HFILE hFile, PFILELOCK pflUnLock,
  103.                                       PFILELOCK pflLock, ULONG timeout,
  104.                                       ULONG flags, FHLOCK fhFileHandleLockID)
  105.  
  106.     DosProtectSetFileLocks locks and unlocks a range of an open file.
  107.  
  108.  
  109.   o DosProtectSetFilePtr() -- Move the Read/Write Pointer
  110.  
  111.         APIRET DosProtectSetFilePtr(HFILE FileHandle, LONG Distance,
  112.                                     ULONG MoveType, PULONG NewPointer,
  113.                                     FHLOCK fhFileHandleLockID)
  114.  
  115.     DosProtectSetFilePtr moves the read or write pointer according to the type
  116.     of move specified.
  117.  
  118.  
  119.   o DosProtectSetFileSize() -- Change the Size of a File
  120.  
  121.         APIRET DosProtectSetFileSize(HFILE hFile, ULONG cbFile,
  122.                                      FHLOCK fhFileHandleLockID)
  123.  
  124.     DosProtectSetFileSize changes the size of a file.
  125.  
  126.  
  127.   o DosProtectWrite() -- Write to a File from a Buffer
  128.  
  129.         APIRET DosProtectWrite(HFILE hFile, PVOID pBuffer, ULONG cbWrite,
  130.                                PULONG pcbActual, FHLOCK fhFileHandleLockID)
  131.  
  132.     DosProtectWrite writes a specified number of bytes from a buffer to the
  133.     specified file.
  134.  
  135.  
  136. Source: OS/2 2.1 PM Programming Reference Vol. I
  137. ------------------------------------------------
  138.  
  139. (no 2.1 specific information found)
  140.  
  141.  
  142. Source: OS/2 2.1 PM Programming Reference Vol. II
  143. -------------------------------------------------
  144.  
  145. New PM APIs:
  146.  
  147.   o WinCheckInput() -- Check Input Event Sources
  148.  
  149.         BOOL WinCheckInput(HAB hab)
  150.  
  151.     This function is used in conjunction with the MsgInputHook hook to input
  152.     simulated events into the Presentation Manager input processing system.
  153.  
  154.  
  155.   o WinLockPointerUpdate() -- Change the Mouse Pointer into a Symbol
  156.  
  157.         BOOL WinLockPointerUpdate(HWND hwndDesktop, HPOINTER hptrNew,
  158.                                   ULONG ulTimeInterval)
  159.  
  160.     This function causes the mouse pointer to change into the symbol described
  161.     by hptrNew for the period of time indicated by ulTimeInterval.
  162.  
  163.  
  164.   o WinLockupSystem() -- Lock Up System
  165.  
  166.         BOOL WinLockupSystem(HAB hab)
  167.  
  168.     This function locks up the system.
  169.  
  170.  
  171.   o WinQuerySysPointerData() -- Return Icon Data for Specified System Pointer
  172.  
  173.         BOOL WinQuerySysPointerData(HWND hwndDesktop, ULONG iptr,
  174.                                     PICONINFO pIconInfo)
  175.  
  176.     This function returns the icon data for the specified system pointer for
  177.     application use.
  178.  
  179.  
  180.   o WinSetPointerOwner() -- Set Pointer Owner
  181.  
  182.         BOOL WinSetPointerOwner(HPOINTER hptr, PID pid, BOOL fDestroy)
  183.  
  184.     This function allows an appplication to declare that a pointer it created
  185.     can now be used by ANY process in the system (not just the process that
  186.     created the pointer).
  187.  
  188.  
  189.   o WinSetSysPointerData() -- Set System Pointer to New Icon
  190.  
  191.         BOOL WinSetSysPointerData(HWND hwndDesktop, ULONG iptr,
  192.                                   PICONINFO pIconInfo)
  193.  
  194.     This function sets the given system pointer to the new icon specified by
  195.     the ICONINFO structure.
  196.  
  197.  
  198.   o WinUnlockSystem() -- Unlock System
  199.  
  200.         BOOL WinUnlockSystem(HAB hab, PSZ pszPassword)
  201.  
  202.     This function causes an application program to attempt to unlock the 
  203.     system.
  204.  
  205.  
  206. New WPS classes/methods:
  207.  
  208.     WPDataFile.wpQueryAssociatedProgram
  209.               .wpSetAssociatedFileIcon
  210.  
  211.     WPDisk.wpEjectDisk
  212.           .wpLockDrive
  213.           .wpQueryDriveLockStatus
  214.  
  215.     WPObject.wpQueryDefStatusView
  216.             .wpSetDefStatusView
  217.  
  218.     WPPower.wpAddPowerPage
  219.            .wpAddPowerViewPager
  220.            .wpChangePowerState
  221.            .wpQueryAutoRefresh
  222.            .wpQueryPowerConfirmation
  223.            .wpQueryPowerManagement
  224.            .wpQueryRefreshRate
  225.            .wpSetAutoRefresh
  226.            .wpSetPowerConfirmation
  227.            .wpSetPowerManagement
  228.            .wpSetRefreshRate
  229.  
  230.  
  231. Source: OS/2 2.1 PM Programming Reference Vol. III
  232. --------------------------------------------------
  233.  
  234. New system hooks:
  235.  
  236.   o FlushBufHook() -- Flush Buffer
  237.  
  238.         BOOL FlushBufHook(HAB hab)
  239.  
  240.     This hook allows applications to save data before the system reboots.
  241.  
  242.  
  243.   o LockupHook() -- Lockup Hook
  244.  
  245.         VOID LockupHook(HAB hab, HWND hwndLockupFrame)
  246.  
  247.     This hook is called when the system locks itself up.
  248.  
  249.  
  250.   o MsgInputHook() -- Message Input Hook
  251.  
  252.         BOOL MsgInputHook(HAB hab, PQMSG pQmsg, BOOL fSkip, PBOOL pfNoRecord)
  253.  
  254.     This hook allows applications to inject one or more events into the
  255.     system input queue without having to use a journal hook, nor write to the
  256.     PM input queue directly.
  257.  
  258.  
  259. New PM messages:
  260.  
  261.     WM_MOUSEMAP -- Remap a mouse message in the PM input queue
  262.  
  263.  
  264. New Data Types:
  265.  
  266.     MT       -- A menu template
  267.     WPPower* -- pointer to an instance of WPPower
  268.  
  269.  
  270. Source: OS/2 2.1 Toolkit - Getting Started
  271. ------------------------------------------
  272.  
  273. New Physical Device Driver IOCtls:
  274.  
  275.   o Lockable Drive IOCtls
  276.  
  277.         Category 8, Function 40H -- Unlock, Lock, and Eject Media
  278.         Category 8, Function 5DH -- Diskette Control
  279.         Category 8, Function 66H -- Query Lock Status
  280.  
  281.  
  282.   o Power Management IOCtls
  283.  
  284.         Category 12, Function 40H -- Send Power Event
  285.         Category 12, Function 41H -- Set Power Event Resource
  286.         Category 12, Function 60H -- Query Power Status
  287.         Category 12, Function 61H -- Query Power Event
  288.         Category 12, Function 62H -- Query Power Info
  289.  
  290.  
  291.   o CD-ROM IOCtls
  292.  
  293.        Category 08H, Function 63H -- Get Device Parameters
  294.  
  295.        Category 80H, Function 40H -- Reset Drive
  296.        Category 80H, Function 44H -- Eject Disk
  297.        Category 80H, Function 46H -- Lock/Unlock Door
  298.        Category 80H, Function 50H -- Seek
  299.        Category 80H, Function 60H -- Device Status
  300.        Category 80H, Function 61H -- Identify CD-ROM Driver
  301.        Category 80H, Function 63H -- Return Sector Size
  302.        Category 80H, Function 70H -- Location of Drive Head
  303.        Category 80H, Function 72H -- Read Long
  304.        Category 80H, Function 78H -- Return Volume Size
  305.        Category 80H, Function 79H -- Get UPC
  306.  
  307.        Category 81H, Function 40H -- Audio Channel Control
  308.        Category 81H, Function 50H -- Play Audio
  309.        Category 81H, Function 51H -- Stop Audio
  310.        Category 81H, Function 52H -- Resume Audio
  311.        Category 81H, Function 60H -- Return Audio-Channel Information
  312.        Category 81H, Function 61H -- Return Audio-Disk Information
  313.        Category 81H, Function 62H -- Return Audio-Track Information
  314.        Category 81H, Function 63H -- Return Audio-Subchannel Q Information
  315.        Category 81H, Function 65H -- Return Audio-Status Information
  316.  
  317.        Category 82H, Function 60H -- Return Drive-Letter Information
  318.  
  319.  
  320.